//
//  NetworkingTool.h
//  UI16_NetworkingTool
//
//  Created by dllo on 15/12/29.
//  Copyright © 2015年 yy. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol NetworkingToolDelegate <NSObject>

- (void)bringResult:(id)result;

@end

typedef void(^Block)(id result);

typedef NS_ENUM(NSUInteger, MethodType) {
    GETType,
    POSTType,
};

@interface NetworkingTool : NSObject

// 根据方法调用时传过来的网址,获取数据,并且解析数据
+ (void)networkingWithStrURL:(NSString *)strURL delegate:(id<NetworkingToolDelegate>)delegate;

+ (void)networkingWithStrURL:(NSString *)strURL block:(Block)block;

+ (void)networkingWithStrURL:(NSString *)strURL type:(MethodType)type bodyStr:(NSString *)bodyStr block:(Block)block;

@end
